<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Default.Master" CodeBehind="BrowseThreads.aspx.vb" Inherits="KDESolutions.Providers.UnitTests.BrowseThreads" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LeftPane" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CenterPane" runat="server">
   <div class="sectiontitle">
       &nbsp;
       <asp:HyperLink runat="server" ID="lnkNewThread1" NavigateUrl="~/ForumsAdmin/AddEditPost.aspx?ForumID={0}">Create new thread</asp:HyperLink></div>
   <p></p>
    <asp:GridView ID="gvwThreads" runat="server" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" DataKeyNames="ID" PageSize="25">
       <Columns>
         <asp:TemplateField>
            <ItemTemplate>
               <asp:Image runat="server" ID="imgThread" ImageUrl="~/Images/Thread.gif" Visible='<%# CInt(Eval("ReplyCount")) < 25 %>' GenerateEmptyAlternateText="true" />
               <asp:Image runat="server" ID="imgHotThread" ImageUrl="~/Images/ThreadHot.gif" Visible='<%# CInt(Eval("ReplyCount")) >= 25 %>' GenerateEmptyAlternateText="true" />
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Left" />
             <ItemStyle Width="16px" />
         </asp:TemplateField>
         <asp:TemplateField HeaderText="Title">
            <ItemTemplate>
               <asp:HyperLink ID="lnkTitle" runat="server" Text='<%# Eval("Title") %>' 
                  NavigateUrl='<%# "ShowThread.aspx?ID=" & Eval("ID") %>' /><br />
               <small>by <asp:Label ID="lblAddedBy" runat="server" Text='<%# Eval("AddedBy") %>'></asp:Label></small>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Left" />
         </asp:TemplateField>
         <asp:TemplateField HeaderText="Last Post" SortExpression="LastPostDate">
            <ItemTemplate>
               <small><asp:Label ID="lblLastPostDate" runat="server" Text='<%# Eval("LastPostDate", "{0:g}") %>'></asp:Label><br />
               by <asp:Label ID="lblLastPostBy" runat="server" Text='<%# Eval("LastPostBy") %>'></asp:Label></small>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="130px" />
            <HeaderStyle HorizontalAlign="Center" />
         </asp:TemplateField>
         <asp:BoundField HeaderText="Replies" DataField="ReplyCount" SortExpression="ReplyCount" >
            <ItemStyle HorizontalAlign="Center" Width="50px" />
            <HeaderStyle HorizontalAlign="Center" />
         </asp:BoundField>
         <asp:BoundField HeaderText="Views" DataField="ViewCount" SortExpression="ViewCount" >
            <ItemStyle HorizontalAlign="Center" Width="50px" />
            <HeaderStyle HorizontalAlign="Center" />
         </asp:BoundField>
         <asp:HyperLinkField Text="&lt;img border='0' src='Images/MoveThread.gif' alt='Move thread' /&gt;"
            DataNavigateUrlFormatString="~/Admin/MoveThread.aspx?ThreadID={0}" DataNavigateUrlFields="ID">
            <ItemStyle HorizontalAlign="Center" Width="20px" />
         </asp:HyperLinkField>
         <asp:ButtonField ButtonType="Image" ImageUrl="~/Images/LockSmall.gif" CommandName="Close" >
             <ItemStyle HorizontalAlign="Center" Width="20px" />
         </asp:ButtonField>         
           <asp:TemplateField ShowHeader="False">
               <ItemStyle HorizontalAlign="Center" Width="20px" />
               <ItemTemplate>
                   <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Delete"
                       ImageUrl="~/Images/Delete.gif" AlternateText="Delete" CommandArgument='<%# Eval("ID") %>' />
               </ItemTemplate>
           </asp:TemplateField>
      </Columns>
      <EmptyDataTemplate><b>No threads to show</b></EmptyDataTemplate>   
   </asp:GridView>
    <p></p>
   <div style="text-align: center;font-weight: bold"><asp:HyperLink runat="server" ID="lnkNewThread2" NavigateUrl="~/ForumsAdmin/AddEditPost.aspx?ForumID={0}">Create new thread</asp:HyperLink></div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightPane" runat="server">
</asp:Content>
